#ifndef CAPP_H_INCLUDED
#define CAPP_H_INCLUDED

#include <SDL/SDL.h>
#include <string>
#include <sstream>

#include "CEvent.h"
#include "CEntity.h"
#include "Define.h"
#include "CCamera.h"
#include "CArea.h"
#include "CPlayer.h"
#include "CChip.h"
#include "SDL/SDL_ttf.h"

class CApp : public CEvent{

    private:
        bool Running;
        bool wonGame;
        int turn;

        //Screen surface
        SDL_Surface* Surf_Display;

        //Text items
        TTF_Font* font;
        SDL_Surface* fontSurface;
        SDL_Color fontColor;
        std::stringstream testString;

        //create arrow
        CEntity arrow;

        //initialize the win surface
        CEntity win;

        /* YOSHI
        //create player 1
        CPlayer Player;

        //create player 2
        CPlayer Player2;
        */

        //create a vector of chip entities
        std::vector<CChip> chips;

    public:
        CApp();
        int OnExecute();


    public:
        //initialization
        bool OnInit();
        bool C4Init();
        //event processing
        void OnEvent(SDL_Event* Event);
        //exit processing
        void OnExit();
        //game loop
        void OnLoop();
        //rendering
        void OnRender();
        //cleanup
        void OnCleanup();
        //tests for game win
        int WinGame();

        //turn control
        void OnTurnControl();

        //on key down
        void OnKeyDown(SDLKey sym, SDLMod mod, Uint16 unicode);

        //on key release
        void OnKeyUp(SDLKey sym, SDLMod mod, Uint16 unicode);

};

#endif // CAPP_H_INCLUDED
